package com.karrim.client.mvp.module;

import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
import com.gwtplatform.mvp.client.gin.DefaultModule;
import com.karrim.client.mvp.DefaultPlaceManager;
import com.karrim.client.mvp.NameTokens;
import com.karrim.client.mvp.annotation.DefaultPlace;
import com.karrim.client.mvp.presenter.FilePresenter;
import com.karrim.client.mvp.presenter.MainPresenter;
import com.karrim.client.mvp.view.FileView;
import com.karrim.client.mvp.view.MainView;

/**
 *
 * @author andrea.cantafio
 */
public class MainModule extends AbstractPresenterModule {
    
    @Override
    protected void configure() {
        install(new DefaultModule(DefaultPlaceManager.class));
        
        bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.home);

        bindPresenter(MainPresenter.class, MainPresenter.NView.class, MainView.class, MainPresenter.NProxy.class);
        bindPresenter(FilePresenter.class, FilePresenter.NView.class, FileView.class, FilePresenter.NProxy.class);
    }
}
